function getTreeData(tree=[]) {
    let arr=[];
    if (!!tree&&tree.length!==0){
        tree.forEach(item=>{
            let obj={};
            obj.title=item.attachmentName;
            obj.id=item.id;
            obj.expand=false;
            if (item.attachmentClass === 0) {
                obj.expand = true;
            }
            obj.attachmentClass=item.attachmentClass
            obj.selected=false;
            obj.children=getTreeData(item.children);
            arr.push(obj);
        });
        return arr;
    }
}
export default getTreeData;
